package com.ruiyi.dto;

import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

//该类是用来接收前端传递的参数的
@Data
public class AccountDto {

    //要对输入的用户名、密码、验证码进行数据的校验
    @NotNull
    @Pattern(regexp = "\\w{4,20}")  //  \\w相当于[a-zA-Z0-9]
    private String username;

    @NotNull
    @Pattern(regexp = "\\d{6}")
    private String pwd;

    @NotNull
    private String email;

    @NotNull
    @Pattern(regexp = "[a-zA-Z0-9]{4}")
    private String captcha;

}
